<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let a = 100
    
    try {
      let b = a / i
      // 可能会发生错误的代码 
      // 如果有错误，这个错误对象自动封装，并传递给catch
    } catch(err) {
      console.dir(err)
    }


    console.log(a)
  </script>
</body>
</html>